Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Determining Vector Dot Products

QuickDraw 3D provides routines that you can use to calculate dot (or scalar , or inner ) products of vectors.

Q3Vector2D_Dot

You can use the Q3Vector2D_Dot function to determine the dot product of two two-dimensional vectors.

float Q3Vector2D_Dot (
                     const TQ3Vector2D *v1,
                     const TQ3Vector2D *v2);
v1
A two-dimensional vector.
v2
A two-dimensional vector.

DESCRIPTION

The Q3Vector2D_Dot function returns, as its function result, a floating-point value that is the dot product of the two vectors v1 and v2 .

Q3Vector3D_Dot

You can use the Q3Vector3D_Dot function to determine the dot product of two three-dimensional vectors.

float Q3Vector3D_Dot (
                     const TQ3Vector3D *v1,
                     const TQ3Vector3D *v2);
v1
A three-dimensional vector.
v2
A three-dimensional vector.

DESCRIPTION

The Q3Vector3D_Dot function returns, as its function result, a floating-point value that is the dot product of the two vectors v1 and v2 .


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |